using System;

namespace uk.co.aspellclark.todolistppc
{
    /// <summary>
    ///   <name>FrmAboutBox</name>
    ///   <namespace>Arcsoft.Common.Ipaq</namespace>
    ///   <version>1.0</version>
    ///   <author>Andy Aspell-Clark</author>
    ///   <description>
    ///   </description>
    ///   <history>
    ///     <historyitem> 1 Aug 2004  1.0 ARA  Initial Version.</historyitem>
    ///   </history>
    /// </summary>
	public class FrmAboutBox : System.Windows.Forms.Form, IDisposable
	{
		private string m_sDesc = null;

		private System.Windows.Forms.Label m_lblAuthor;
		private System.Windows.Forms.Label m_lnklblWebsite;
        private System.Windows.Forms.Button m_btnDone;
        private System.Windows.Forms.Label m_lblAppTitle;
        private System.Windows.Forms.Label m_lblAppDescription;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;


        /// <summary>
        /// 
        /// </summary>
        public string AppTitle
        {
            get { return m_lblAppTitle.Text;  }
            set { m_lblAppTitle.Text = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public string AppDescription
        {
            get { return m_lblAppDescription.Text;  }
            set { m_lblAppDescription.Text = value; }
        }


		/// <summary>
		/// constructor
		/// </summary>
		public FrmAboutBox()
		{
			// Required for Windows Form Designer support
			InitializeComponent();
		}
        /// <summary>
        /// 
        /// </summary>
        /// <param name="aString"></param>
		public void setDescription(string aString)
		{
			Description = aString;
		}

        /// <summary>
        /// 
        /// </summary>
        public string Description
        {
            set 
            {
                m_sDesc = value;
                //richTextBox1.Text = m_sDesc;
            }
        }

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose (bool disposing)
		{
			if (disposing)
			{
				if (components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose(disposing);
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.m_lnklblWebsite = new System.Windows.Forms.Label();
			this.m_lblAuthor = new System.Windows.Forms.Label();
			this.m_btnDone = new System.Windows.Forms.Button();
			this.m_lblAppTitle = new System.Windows.Forms.Label();
			this.m_lblAppDescription = new System.Windows.Forms.Label();
			this.m_lblBuildDate = new System.Windows.Forms.Label();
			this.SuspendLayout();
			// 
			// m_lnklblWebsite
			// 
			this.m_lnklblWebsite.Location = new System.Drawing.Point(0, 184);
			this.m_lnklblWebsite.Name = "m_lnklblWebsite";
			this.m_lnklblWebsite.Size = new System.Drawing.Size(240, 20);
			this.m_lnklblWebsite.Text = "http://www.Arcsoft.org.uk/";
			this.m_lnklblWebsite.TextAlign = System.Drawing.ContentAlignment.TopCenter;
			// 
			// m_lblAuthor
			// 
			this.m_lblAuthor.ForeColor = System.Drawing.Color.Orchid;
			this.m_lblAuthor.Location = new System.Drawing.Point(0, 160);
			this.m_lblAuthor.Name = "m_lblAuthor";
			this.m_lblAuthor.Size = new System.Drawing.Size(240, 20);
			this.m_lblAuthor.Text = "Andy Aspell-Clark";
			this.m_lblAuthor.TextAlign = System.Drawing.ContentAlignment.TopCenter;
			// 
			// m_btnDone
			// 
			this.m_btnDone.Location = new System.Drawing.Point(100, 231);
			this.m_btnDone.Name = "m_btnDone";
			this.m_btnDone.Size = new System.Drawing.Size(75, 23);
			this.m_btnDone.Text = "Done";
			this.m_btnDone.Click += new System.EventHandler(this.m_btnDone_Click);
			// 
			// m_lblAppTitle
			// 
			this.m_lblAppTitle.Location = new System.Drawing.Point(0, 0);
			this.m_lblAppTitle.Name = "m_lblAppTitle";
			this.m_lblAppTitle.Size = new System.Drawing.Size(240, 48);
			this.m_lblAppTitle.Text = "App Title";
			this.m_lblAppTitle.TextAlign = System.Drawing.ContentAlignment.TopCenter;
			// 
			// m_lblAppDescription
			// 
			this.m_lblAppDescription.Location = new System.Drawing.Point(0, 48);
			this.m_lblAppDescription.Name = "m_lblAppDescription";
			this.m_lblAppDescription.Size = new System.Drawing.Size(240, 104);
			this.m_lblAppDescription.Text = "App Description";
			this.m_lblAppDescription.TextAlign = System.Drawing.ContentAlignment.TopCenter;
			// 
			// m_lblBuildDate
			// 
			this.m_lblBuildDate.Location = new System.Drawing.Point(36, 206);
			this.m_lblBuildDate.Name = "m_lblBuildDate";
			this.m_lblBuildDate.Size = new System.Drawing.Size(138, 15);
			this.m_lblBuildDate.Text = "Built on ";
			// 
			// FrmAboutBox
			// 
			this.ClientSize = new System.Drawing.Size(292, 266);
			this.Controls.Add(this.m_lblBuildDate);
			this.Controls.Add(this.m_lblAppDescription);
			this.Controls.Add(this.m_lblAppTitle);
			this.Controls.Add(this.m_btnDone);
			this.Controls.Add(this.m_lnklblWebsite);
			this.Controls.Add(this.m_lblAuthor);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "FrmAboutBox";
			this.Text = "About...";
			this.Load += new System.EventHandler(this.FrmAboutBox_Load);
			this.ResumeLayout(false);
        }
		private System.Windows.Forms.Label m_lblBuildDate;
		#endregion

        private void m_btnDone_Click(object sender, System.EventArgs e)
        {
            Close();
        }

        private void FrmAboutBox_Load(object sender, System.EventArgs e)
        {
        	//DateTime buildTime = File.GetCreationTime("TodolistPPC.exe");
        	//m_lblBuildDate.Text = buildTime.ToString("dd MMM YYYY");
        	m_lblBuildDate.Visible = false;
        	
            //m_lblAuthor.Bounds = new Rectangle(0, top, this.Width, height);
            //m_lnklblWebsite.Bounds = new Rectangle(0, top, this.Width, height);
            m_lblAppTitle.Left = (this.Width / 2) - (m_lblAppTitle.Width/2);
            m_lblAppDescription.Left = (this.Width / 2) - (m_lblAppDescription.Width/2);
            m_lnklblWebsite.Left = (this.Width / 2) - (m_lnklblWebsite.Width/2);
            m_lblAuthor.Left = (this.Width / 2) - (m_lblAuthor.Width/2);
            
            m_btnDone.Top = this.Height - (m_btnDone.Height*2);
            m_btnDone.Left = (this.Width / 2) - (m_btnDone.Width/2);
            
            m_lblBuildDate.Top = m_btnDone.Top - (m_lblBuildDate.Height*2);
            m_lblBuildDate.Left = (this.Width / 2) - (m_lblBuildDate.Width/2);
        }
	}//class()
}
